﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SWA_View
{
    public partial class TestItems : Form
    {
        int _ProjectID;
        public TestItems(int ProjectID)
        {
            InitializeComponent();
            _ProjectID = ProjectID;
            this.Load += new EventHandler(TestItems_Load);
        }

        List<RadioButton> RadioButtons = new List<RadioButton>();
        void TestItems_Load(object sender, EventArgs e)
        {
            RadioButtons.Clear();
            RadioButtons.Add(zlTest);
            RadioButtons.Add(zhTest);
            RadioButtons.Add(csTest);
            RadioButtons.Add(zxgzbLRWT);
            RadioButtons.Add(zxbgzbLIWT);
            RadioButtons.Add(lshygzbRT);
            RadioButtons.Add(lshybgzbRI);
            RadioButtons.Add(defualtRRT);
        }


        private void btnCancel_Click(object sender, EventArgs e)
        {

            DialogResult rsltEnsure = MessageBox.Show("确定要退出吗？", "确认关闭", MessageBoxButtons.OKCancel);
            if (rsltEnsure == DialogResult.OK)
            {
                
                this.DialogResult = DialogResult.Cancel;
                this.Close();
            }
            else
            {

            }
        }
        public string TestItem = string.Empty;
        private void btnOK_Click(object sender, EventArgs e)
        {
            TestItem = string.Empty;
            foreach (var c in RadioButtons)
            {
                if (c.Checked == true)
                {
                    TestItem = c.Name;
                }
            }
             this.DialogResult = DialogResult.OK;
        }

      

        private void radioButton1_Click(object sender, EventArgs e)
        {
            zxgzbLRWT.Checked = false;
            zxbgzbLIWT.Checked = false;
            lshygzbRT.Checked = false;
            lshybgzbRI.Checked = false;
            defualtRRT.Checked = false;
        }

        private void radioButton2_Click(object sender, EventArgs e)
        {
            zxgzbLRWT.Checked = false;
            zxbgzbLIWT.Checked = false;
            lshygzbRT.Checked = false;
            lshybgzbRI.Checked = false;
            defualtRRT.Checked = false;
        }

        private void radioButton3_Click(object sender, EventArgs e)
        {
            zxgzbLRWT.Checked = false;
            zxbgzbLIWT.Checked = false;
            lshygzbRT.Checked = false;
            lshybgzbRI.Checked = false;
            defualtRRT.Checked = false;
        }

        private void radioButton4_Click(object sender, EventArgs e)
        {
            zlTest.Checked = false;
            zhTest.Checked = false;
            csTest.Checked = false;
        }

        private void radioButton5_Click(object sender, EventArgs e)
        {
            zlTest.Checked = false;
            zhTest.Checked = false;
            csTest.Checked = false;
        }

        private void radioButton6_Click(object sender, EventArgs e)
        {
            zlTest.Checked = false;
            zhTest.Checked = false;
            csTest.Checked = false;
        }

        private void radioButton7_Click(object sender, EventArgs e)
        {
            zlTest.Checked = false;
            zhTest.Checked = false;
            csTest.Checked = false;
        }

        private void radioButton8_Click(object sender, EventArgs e)
        {
            zlTest.Checked = false;
            zhTest.Checked = false;
            csTest.Checked = false;
        }

        private void zhTest_CheckedChanged(object sender, EventArgs e)
        {

        }
    }
}
